package a.e.b.c;

import a.c.q;
import a.e.b.a.y;
import a.e.b.e;
import a.e.b.i;

import java.util.*;

public class p
{
  private List a = new LinkedList();
  private List b = new LinkedList();
  private boolean c;
  private boolean d;
  private final Map e = new HashMap();
  private final e f = new e();
  private static final String g = "http://www.w3.org/2001/XMLSchema-instance";
  private x h = new j();
  static Class i;
  public static boolean j;
  
  public void a(t paramt)
  {
    if (!a.b) {
      if (!this.d)
      {
        this.d = true;
        b();
      }
    }
    this.b.add(0, paramt);
  }
  
  public void b(t paramt)
  {
    if ((a.b) || (this.b != null)) {
      this.b.remove(paramt);
    }
  }
  
  protected void a(db paramdb)
    throws a
  {
    boolean bool = a.a;
    if (this.b != null)
    {
      Iterator localIterator = new ArrayList(this.b).iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        t localt = (t)localIterator.next();
        localt.a(paramdb);
      } while (!bool);
    }
  }
  
  public void a(v paramv)
  {
    if (!a.b) {
      if (!this.c)
      {
        this.c = true;
        a();
      }
    }
    this.a.add(0, paramv);
  }
  
  public void b(v paramv)
  {
    if ((a.b) || (this.a != null)) {
      this.a.remove(paramv);
    }
  }
  
  protected void a(eb parameb)
    throws a
  {
    boolean bool = a.b;
    if (this.a != null)
    {
      Iterator localIterator = new ArrayList(this.a).iterator();
      while ((!parameb.c()) && ((bool) || (localIterator.hasNext())))
      {
        v localv = (v)localIterator.next();
        localv.a(parameb);
        if (parameb.c()) {}
      }
    }
  }
  
  protected void a() {}
  
  protected void b() {}
  
  protected Map a(o paramo)
    throws a
  {
    boolean bool2 = a.b;
    boolean bool1 = a.a;
    LinkedList localLinkedList = new LinkedList();
    db localdb = new db(this, paramo, localLinkedList);
    a(localdb);
    HashMap localHashMap = new HashMap();
    Iterator localIterator = i.a().iterator();
    Object localObject;
    while (localIterator.hasNext())
    {
      localObject = (i)localIterator.next();
      localHashMap.put(localObject, new LinkedList());
      if (bool2) {
        break label146;
      }
      if (bool1) {
        break label139;
      }
      if (bool1)
      {
        if (bool2) {
          break label146;
        }
        if (!bool2) {}
        q.n = !q.n;
      }
    }
    localIterator = localLinkedList.iterator();
    label139:
    label146:
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      localObject = (db.a_)localIterator.next();
      if ((!bool2) && (bool1)) {
        break label204;
      }
      ((Collection)localHashMap.get(((db.a_)localObject).b())).add(((db.a_)localObject).a());
    } while (!bool1);
    label204:
    if (q.o) {
      a.b = !bool2;
    }
    return localHashMap;
  }
  
  protected void a(o paramo, Object paramObject, Class paramClass)
    throws a
  {
    eb localeb = new eb(this, paramo, paramObject, paramClass);
    a(localeb);
    if (!localeb.c()) {
      throw new b("Unable to serialize " + paramObject);
    }
  }
  
  public void a(Object paramObject1, Object paramObject2)
  {
    this.e.put(paramObject1, paramObject2);
  }
  
  public void a(Object paramObject)
  {
    this.e.remove(paramObject);
  }
  
  public Object b(Object paramObject)
  {
    return this.e.get(paramObject);
  }
  
  public void a(Class paramClass, Object paramObject)
  {
    this.f.a(paramClass, paramObject);
  }
  
  public void a(Class paramClass)
  {
    this.f.c(paramClass);
  }
  
  protected Object b(Class paramClass)
  {
    return this.f.a(paramClass);
  }
  
  protected o a(q paramq, cb paramcb)
  {
    b_ localb_ = new b_(paramcb);
    localb_.a(paramq);
    return localb_;
  }
  
  public void b(q paramq, cb paramcb)
    throws a
  {
    o localo = a(paramq, paramcb);
    l locall = new l(localo);
    locall.a("y.io.graphml.output.SerializationProperties.CURRENT_KEY_SCOPE", i.g);
    locall.c().a(new c_(null));
    new k(a(locall)).a(locall);
  }
  
  public x c()
  {
    return this.h;
  }
  
  static Class a(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  private class b_
    implements o
  {
    private q a;
    private Collection b = new ArrayList(1);
    private cb c;
    
    public b_(cb paramcb)
    {
      this.c = paramcb;
      this.b.add(null);
    }
    
    public Object a(Class paramClass)
    {
      if (!a.b) {}
      if (paramClass == (p.i == null ? (p.i = p.a("a.e.b.c.j")) : p.i)) {
        return p.this.h;
      }
      return p.this.b(paramClass);
    }
    
    public Collection a()
    {
      return this.b;
    }
    
    public Object b()
    {
      return null;
    }
    
    public x c()
    {
      return p.this.h;
    }
    
    public cb d()
    {
      return this.c;
    }
    
    public q e()
    {
      return this.a;
    }
    
    void a(q paramq)
    {
      this.a = paramq;
    }
    
    public Object a(Object paramObject)
    {
      return p.this.b(paramObject);
    }
    
    public void b(Object paramObject)
      throws a
    {
      a(this, paramObject, null);
    }
    
    public void a(o paramo, Object paramObject, Class paramClass)
      throws a
    {
      p.this.a(paramo, paramObject, paramClass);
    }
  }
  
  private static class c_
    extends z
  {
    private c_() {}
    
    private void q(fb paramfb)
    {
      boolean bool2 = a.b;
      boolean bool1 = a.a;
      Map localMap = (Map)paramfb.a().a("ToplevelNamespaces");
      bb localbb = paramfb.a().d().e();
      if ((bool2) || (localMap != null))
      {
        Iterator localIterator = localMap.entrySet().iterator();
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          Map.Entry localEntry = (Map.Entry)localIterator.next();
          localbb.a(localEntry.getKey().toString(), localEntry.getValue().toString());
        } while (!bool1);
      }
    }
    
    private void r(fb paramfb)
    {
      boolean bool3 = a.b;
      boolean bool2 = a.a;
      Map localMap = (Map)paramfb.a().a("SchemaLocations");
      boolean bool1 = y.a(paramfb.a(), "WriteSchemaLocations");
      if ((bool1) && ((bool3) || (localMap != null)) && (localMap.size() > 0))
      {
        StringBuffer localStringBuffer = new StringBuffer();
        Iterator localIterator = localMap.entrySet().iterator();
        do
        {
          do
          {
            do
            {
              if (!localIterator.hasNext()) {
                break;
              }
              Map.Entry localEntry = (Map.Entry)localIterator.next();
              localStringBuffer.append(localEntry.getKey()).append(" ").append(localEntry.getValue());
            } while (!localIterator.hasNext());
            localStringBuffer.append(" ");
            if ((bool3) || ((!bool3) && (bool2))) {
              return;
            }
          } while (bool3);
        } while (!bool2);
        paramfb.a().d().a("xsi", "schemaLocation", "http://www.w3.org/2001/XMLSchema-instance", localStringBuffer.toString());
      }
    }
    
    public void k(fb paramfb)
    {
      q(paramfb);
      r(paramfb);
    }
    
    c_(p.0 param0)
    {
      this();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.b.c.p

 * JD-Core Version:    0.7.0.1

 */